package com.glorystone.ins.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.glorystone.ins.beanUtils.annotation.ExcelField;
import com.glorystone.ins.domain.Channel;import com.glorystone.ins.domain.CustomLocalDateSerializer;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDate;
public @Data class OrderVo {

    private Long tid;//订单tid
    private Long capitalId;//订单流水tid
    @ExcelField(title = "保单号",type = 1, align = 2, sort = 25,complete = "ok",completeChannel = "no")
    private String ordNum;//保单号
    private String ordCode;//订单编号
    @ExcelField(title = "付款主体", align = 2, sort = 25,complete = "ok",completeChannel = "no")
    private String paySubjects;
    private Integer paySubject;
    @ExcelField(title = "保险公司名称",type = 1,align = 2, sort = 25,complete = "ok",completeChannel = "no")
    private String insyrerName;//保险公司名称
    @ExcelField(title = "渠道名称", align = 2, sort = 25,complete = "ok",completeChannel = "no")
    private String companyRegisterName;
    private String name;//渠道名称
    @ExcelField(title = "渠道联系电话", align = 2, sort = 25,complete = "ok",completeChannel = "no")
    private String telephone;
    @ExcelField(title = "险种",type = 1, align = 2, sort = 25,complete = "ok",completeChannel = "no")
    private String typeInsurances;
    private Integer typeInsurance;//险种
    private Long channelId;//渠道id
    private String channelIds;//渠道id

    private Long insyrerId;//保险公司id
    
    private Long userId;//业务员id
    
    private String username;//业务名称

    private Long productId;
    @ExcelField(title = "被保险人",type = 1, align = 2, sort = 25,complete = "ok",completeChannel = "no")
    @Value("-")
    private String insurant;//被保险人
    @ExcelField(title = "身份证号/组织机构代码证", align = 2, sort = 25,complete = "ok",completeChannel = "no")
    private String orgIdCode;//身份证号/组织机构代码证

    private String applicant;//投保人


    private String phone;
    @ExcelField(title = "车牌号",type = 1, align = 2, sort = 25,complete = "ok",completeChannel = "no")
    @Value("-")
    private String plateNum;//车牌号
    @ExcelField(title = "车主", align = 2, sort = 25,complete = "ok")
    private String carOwner;//车主
    @ExcelField(title = "车辆类型", align = 2, sort = 25)
    private Integer vehicleType;   //车辆类型
    @ExcelField(title = "前保险公司", align = 2, sort = 25)
    private String preInsyrer;//前保险公司
    private Integer status;//状态
    @ExcelField(title = "车架号",type = 1, align = 2, sort = 25)
    @Value("-")
    private String frameNumber;//车架号
    @ExcelField(title = "发动机号", align = 2, sort = 25)
    @Value("-")
    private String engineNum;//发动机号
    private Integer typeInvestment;//投保类型
    @ExcelField(title = "垫资到期日",type = 1, align = 2, sort = 25,completeChannel = "no")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonSerialize(using = CustomLocalDateSerializer.class)
    private LocalDate insyrerMaturityDate;//垫资到期日
    @ExcelField(title = "垫资账期", align = 2, sort = 25)
    private Integer laonAccount;//垫资账期
    @ExcelField(title = "起保日期", align = 2, sort = 25,complete = "ok",completeChannel = "no")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonSerialize(using = CustomLocalDateSerializer.class)
    private LocalDate datePolicy;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonSerialize(using = CustomLocalDateSerializer.class)
    private LocalDate insureStartDate;//订单创建日期
    @ExcelField(title = "止保日期", align = 2, sort = 25)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonSerialize(using = CustomLocalDateSerializer.class)
    private LocalDate insureEndDate;//止保日期
    private Integer insureOverTime;

    private Long saleman;
    @ExcelField(title = "垫资类型", align = 2, sort = 25)
    private Integer typeInsurance2;//垫资类型

    @ExcelField(title = "商业保险费(元)", type = 1,align = 2, sort = 25,complete = "ok",completeChannel = "no")
    private BigDecimal mercialPremium;//商业保险费
    @ExcelField(title = "交强保险费(元)",type = 1, align = 2, sort = 25,complete = "ok",completeChannel = "no")
    private BigDecimal pulsoryPremium;//交强保险费
    @ExcelField(title = "车船税(元)",type = 1, align = 2, sort = 25,complete = "ok",completeChannel = "no")
    private BigDecimal vechcleVesselTax;//车船税
    @ExcelField(title = "全保费(元)",type = 1, align = 2, sort = 25,complete = "ok",completeChannel = "no")
    private BigDecimal allPremium;//全保费
    @ExcelField(title = "税后保费(元)", align = 2, sort = 25)
    private BigDecimal texPremium;//税后保费

    private BigDecimal followPoint;

    private BigDecimal replenishPoint;
    @ExcelField(title = "渠道返点(%)",type = 1, align = 2, sort = 25,completeChannel = "no")
    private BigDecimal channelRebate;//渠道返点

    private Long createBy;

    private LocalDate createDate;

    private Long updateBy;

    private LocalDate updateDate;
    @ExcelField(title = "渠道结算日期", align = 2, sort = 25,completeChannel = "no")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonSerialize(using = CustomLocalDateSerializer.class)
    private LocalDate payDate;//渠道结算日期

    private Integer delFlag;

    @ExcelField(title = "应支付保费(元)",type = 1, align = 2, sort = 25,completeChannel = "no")
    private BigDecimal mustPremium;//应收付保费（应支付保费）
    @ExcelField(title = "返佣费(元)",type = 1, align = 2, sort = 25,complete = "ok",completeChannel = "no")
    private BigDecimal mustRebateAmt;//应收返返点（返佣费）
    @ExcelField(title = "对手方", align = 2, sort = 25)
    private Integer opponent;//对手方
    @ExcelField(title = "交易类型", align = 2, sort = 25)
    private Integer tradeType;//交易类型

    private Channel channel;//渠道信息
    @ExcelField(title = "保险公司结算日期", align = 2, sort = 25,complete = "ok")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonSerialize(using = CustomLocalDateSerializer.class)
    private LocalDate receiptDate;
    
    /**
     * 核对结果
     */
    @ExcelField(title = "核对结果", align = 2, sort = 25,complete = "ok")
    private String checkResults;
    private Integer checkResult;
    @ExcelField(title = "开单日期", align = 2, sort = 25,complete = "ok",completeChannel = "no")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonSerialize(using = CustomLocalDateSerializer.class)
    private LocalDate dateIssuance;//开单日期
    /**
     * 实收保险公司返佣费
     */
    @ExcelField(title = "实收保险公司返点费(元)", type = 1,align = 2, sort = 25,complete = "ok")
    private BigDecimal realRebateAmt;
    @ExcelField(title = "状态",type = 1, align = 2, sort = 25)
    private String channelStatusName;
    private Integer channelStatus;//渠道订单状态
    private LocalDate surrenderDate;//退保日期

}